package com.ctl.szmd.szmd.feature_wm.data.model

import androidx.recyclerview.widget.DiffUtil

/**
 * created by : chentl
 * Date: 2020/07/30
 */
data class WmDataListModel(
    var id: String? = null,

    var title: String? = null,
    var infoSource: String? = null,
    var bodyTxt: String? = null,
    var time: String? = null,
    var thumbnailNetPath: String? = null,
    var pageNetPath: String? = null,
    var typeName: String? = null,
    var visitCount: Int? = null,
    var flowerCount: Int? = null,
    var attachmentCount: Int? = null,
    var visitTypeNum: Int? = null,

    var attachmentName: String? = null,
    var attachmentNetPath: String? = null


) {
    companion object {
        val diffCallback =
            object : DiffUtil.ItemCallback<WmDataListModel>() {
                override fun areItemsTheSame(
                    oldItem: WmDataListModel,
                    newItem: WmDataListModel
                ): Boolean {
                    return oldItem.id == newItem.id
                }

                override fun areContentsTheSame(
                    oldItem: WmDataListModel,
                    newItem: WmDataListModel
                ): Boolean {
                    return oldItem == newItem
                }

            }
    }
}